(function(window){

    const cateBox = document.querySelector('main > .info')
    
    getNavigation()
    function getNavigation(){
        ajax({
            url:'http://chst.vip:1234/api/getsitenav',
            success(res){
                res = res.result
                console.log(res);
                binList(res)
            }
        })
    }

    function binList(res){
        let str = ''

        res.forEach(item => {
            str += `
            <li>
            <a href="${item.navHref}"><img src="${item.navImg}" alt="">${item.navTitle}</a>
           </li>
     
            `
        });
        cateBox.innerHTML = str
    }

})(window)